package cn.ilikes.tools.nosql.test.jpa.pojos;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import cn.ilikes.tools.nosql.jpa.annotations.IndexColumn;

@Entity
@Table(name = "pe_depts", schema = "ilikes")
public class Depts {
	@Id
	@IndexColumn(index = IndexColumn.Index.analyzed, name = "id", store = IndexColumn.Store.yes)
	private Integer uuid;

	@Column(name = "dept_name")
	@IndexColumn(index = IndexColumn.Index.not_analyzed, name = "deptName", store = IndexColumn.Store.no)
	private String deptName;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "depts")
	private List<DeptEmployeMaps> deptEmployeMaps;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "depts")
	public List<DeptEvaluationKpiMaps> deptEvaluationKpiMaps;

	public Integer getUuid() {
		return uuid;
	}

	public void setUuid(Integer uuid) {
		this.uuid = uuid;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public List<DeptEmployeMaps> getDeptEmployeMaps() {
		return deptEmployeMaps;
	}

	public void setDeptEmployeMaps(List<DeptEmployeMaps> deptEmployeMaps) {
		this.deptEmployeMaps = deptEmployeMaps;
	}

	public List<DeptEvaluationKpiMaps> getDeptEvaluationKpiMaps() {
		return deptEvaluationKpiMaps;
	}

	public void setDeptEvaluationKpiMaps(List<DeptEvaluationKpiMaps> deptEvaluationKpiMaps) {
		this.deptEvaluationKpiMaps = deptEvaluationKpiMaps;
	}

}
